const gulp = require('gulp');
const fs = require("fs");

// Make automatic symlinks for dist folders from articles folders
if (fs.existsSync('./articles/'+jsonData['articles'][i]['dir']+'/dist')
	&& ! fs.existsSync(outputdir+'/'+jsonData['articles'][i]['dir']+'/dist')) {
	gulp.src('./articles/'+jsonData['articles'][i]['dir']+'/dist/*')
		.pipe(gulp.symlink(outputdir+'/'+jsonData['articles'][i]['dir'], {
				relativeSymlinks: true
			}));
}